package com.time.timespace.service;

import com.time.timespace.commons.dto.ResponseEntity;
import com.time.timespace.domain.dto.TokenDTO;
import com.time.timespace.domain.entity.User;
import jakarta.servlet.http.HttpServletRequest;

public interface LoginService {

    /**
     * 登录
     * @param user
     * @return
     */
    TokenDTO login(User user);

    /**
     * 退出登录
     * @param request
     * @return
     */
    ResponseEntity<?> logout(HttpServletRequest request);

    User getSelfInfo(Long userId);

    User getSelfByName(String userName);

    void selfUpdate(User user);
}
